Pinned frames: ride the global lock + per-set position panel#161
Open
Krathe82 wants to merge 8 commits into
Open
Pinned frames: ride the global lock + per-set position panel#161Krathe82 wants to merge 8 commits into
Krathe82 wants to merge 8 commits into
Conversation
Pinned frames no longer have their own Lock Position toggle — they now lock/unlock together with the main party/raid frames (global lock only). Unlocking shows each set's drag handle; locking hides them all. The per-set lock field is retired and migrated away. Each set's handle also opens the same nudge position panel as party/raid (precise X/Y, Center, Reset), titled with the set name and mode and themed raid-orange for raid sets. Pinned gets its own Snap to Grid and Hide Mover, independent of the main frames and off by default. Handles read as interactive: hover highlight + tooltip, the targeted set's handle is solid while the others dim, and handles auto-size to their label.
Pin each pinned container by its GROWTH corner (not its saved-point corner) via a shared PositionPinnedContainer helper, with pos.point kept as the screen reference plus a half-frame offset. The first frame's screen position no longer depends on the container's frame count, so test mode (sized to testCount) and live (sized to the visible count) place the frames identically — with no migration and no jump for existing positions. Also re-apply the saved position when leaving test mode: a test-mode drag updates set.position, but the live container was only re-reading it on a /reload, so it snapped back to its old spot. ExitTestMode now repositions each live container from set.position on the way out.
CENTER never actually centred the pinned frames — they grew START-style and only the anchor/label shifted. Remove it from the Frame Growth / Column Growth dropdowns (Start / End only) and normalise existing CENTER values to START (no visual change, since CENTER already rendered as START). The layout plumbing is left in place for a proper centred mode later.
- Live-mover drag mirrors position to _realRaidDB only in raid (IsInRaid guard); party drags no longer overwrite the raid set's saved position. - A user Lock during combat clears the combat-restore intent so handles don't re-appear after combat (SetMoversShown(false) cancels moversShownBeforeCombat/ pendingMoversShown; LockAllForCombat re-arms it after). - SetEnabled doesn't show live chrome while test mode is active (the preview owns the screen) and re-asserts Hide-Mover alpha + active-highlight on re-show. - RemoveSet compacts _realRaidDB.pinnedFrames.sets too (raid, identity-guarded) so the index-based position mirror stays aligned after a remove. - FullProfileRefresh pinned loops use MAX_SETS (sets 3-4 refresh on profile switch). - Pinned snap-to-grid uses a point-snap (its coord is a point anchor, not a centred box) instead of the centre/edge model.
- RestampPinnedPresets restamps all MAX_SETS sets after a preset rename/delete
(was sets 1-2 only), so sets 3-4 don't keep a stale/dead preset stamp.
- Exporting/importing the pinnedFrames category carries the Aura/Text Designer
preset libraries, so a shared pinned set doesn't land on a missing preset.
- Trim the dead PINNED_DEFAULTS keys (incl. a contradictory keepOfflinePlayers
default) to just {enabled}.
…ead locked writes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reworks how pinned frames are positioned and locked.
Global lock
Pinned frames no longer have their own Lock Position toggle — they lock and unlock together with the main party/raid frames. Unlocking shows each set's drag handle; locking hides them all. The per-set lock field is retired and migrated away.
Per-set position panel
Each set's drag handle opens the same nudge position panel as the party/raid frames (precise X/Y, Center, Reset). The panel is titled with the set's name and mode (e.g. NPC (Raid)) and themed raid-orange for raid sets. Pinned gets its own Snap to Grid and Hide Mover, independent of the main frames and off by default.
Handle discoverability
Pinned handles now read as interactive: hover highlight + a tooltip ("Drag to move / Click to open the position panel"), the targeted set's handle stays solid while the others dim so it's clear which set the panel is driving, and handles auto-size to their label.
Self-contained: party/raid lock wiring, a
pinnedPOSITION_MODES descriptor, and a guarded migration that strips the deadset.lockedfield. No new dependencies.